<!DOCTYPE html>
<html lang="zh-cn">
    <head>
        <meta charset="utf-8">
        <title>定时任务编辑</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="renderer" content="webkit">

        <link rel="shortcut icon" href="assets/img/favicon.ico" />
        <!-- Loading Bootstrap -->
        <link href="assets/css/backend.min.css" rel="stylesheet">

        <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
        <!--[if lt IE 9]>
          <script src="assets/js/html5shiv.js"></script>
          <script src="assets/js/respond.min.js"></script>
        <![endif]-->
        <script type="text/javascript">
            var require = {
                "config": {
                    "site": {
                        "name": "FastAdmin",
                        "cdnurl": "./",
                        "version": "1.0.0",
                        "timezone": "Asia/Shanghai",
                        "languages": {
                            "backend": "zh-cn",
                            "frontend": "zh-cn"
                        }
                    },
                    "upload": {
                        "cdnurl": "./",
                        "uploadurl": "data/upload.json",
                        "bucket": "yourbucketname",
                        "maxsize": "10mb",
                        "mimetype": "*",
                        "multipart": {
                            "policy": "eyJidWNrZXQiOiJ5b3VyYnVja2V0bmFtZSIsInNhdmUta2V5IjoiXC91cGxvYWRzXC97eWVhcn17bW9ufXtkYXl9XC97ZmlsZW1kNX17LnN1ZmZpeH0iLCJleHBpcmF0aW9uIjoxNTAwNTM0ODY3LCJub3RpZnktdXJsIjoiaHR0cDpcL1wvd3d3LnlvdXJzaXRlLmNvbVwvdXB5dW5cL25vdGlmeSJ9",
                            "signature": "0695b542bd91d5d0eea7c0a44a37dd54",
                            "bucket": "yourbucketname",
                            "save-key": "/uploads/{year}{mon}{day}/{filemd5}{.suffix}",
                            "expiration": 1500534867,
                            "notify-url": "http://www.yoursite.com/upyun/notify"
                        },
                        "multiple": false
                    },
                    "modulename": "admin",
                    "controllername": "crontab",
                    "actionname": "edit",
                    "jsname": "backend/general/crontab",
                    "moduleurl": "./",
                    "language": "zh-cn",
                    "referer": null
                }
            };
        </script>
    </head>

    <body class="inside-header inside-aside is-dialog">
        <div id="main" role="main">
            <div class="tab-content tab-addtabs">
                <div id="content">
                    <div class="row">
                        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                            <section class="content-header hide">
                                <h1>
                                    控制台                                    <small>Control panel</small>
                                </h1>
                            </section>
                            <div class="content">
                                <style type="text/css">
                                    #schedulepicker {
                                        padding-top:7px;
                                    }
                                </style>
                                <form id="edit-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="data/edit.json">
                                    <div class="form-group">
                                        <label for="name" class="control-label col-xs-12 col-sm-2">任务标题:</label>
                                        <div class="col-xs-12 col-sm-8">
                                            <input type="text" class="form-control" id="title" name="row[title]" value="请求FastAdmin" data-rule="required" />
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="name" class="control-label col-xs-12 col-sm-2">类型:</label>
                                        <div class="col-xs-12 col-sm-8">
                                            <select class="form-control" data-rule="required" name="row[type]"><option value="url" selected="selected">请求URL</option><option value="sql">执行SQL</option><option value="shell">执行Shell</option></select>        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="content" class="control-label col-xs-12 col-sm-2">内容:</label>
                                        <div class="col-xs-12 col-sm-8">
                                            <textarea name="row[content]" id="conent" cols="30" rows="5" class="form-control" data-rule="required">http://www.fastadmin.net</textarea>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="schedule" class="control-label col-xs-12 col-sm-2">执行周期:</label>
                                        <div class="col-xs-12 col-sm-8">
                                            <input type="text" class="form-control" id="schedule" style="font-size:12px;font-family: Verdana;word-spacing:23px;" name="row[schedule]" value="* * * * *" data-rule="required; remote(data/check.json)" />
                                            <div id="schedulepicker">
                                                <pre><code>*    *    *    *    *
-    -    -    -    -
|    |    |    |    +--- day of week (0 - 7) (Sunday=0 or 7)
|    |    |    +-------- month (1 - 12)
|    |    +------------- day of month (1 - 31)
|    +------------------ hour (0 - 23)
+----------------------- min (0 - 59)</code></pre>
                                                <h5>接下来 <input type="number" id="pickdays" class="form-control text-center" value="7" style="display: inline-block;width:80px;"> 次的执行时间</h5>
                                                <ol id="scheduleresult" class="list-group">
                                                </ol>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="maximums" class="control-label col-xs-12 col-sm-2">最多执行:</label>
                                        <div class="col-xs-12 col-sm-4">
                                            <input type="number" class="form-control" id="maximums" name="row[maximums]" value="0" data-rule="required" size="6" />
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="begintime" class="control-label col-xs-12 col-sm-2">开始时间:</label>
                                        <div class="col-xs-12 col-sm-4">
                                            <input type="text" class="form-control datetimepicker" id="begintime" name="row[begintime]" value="2017-01-01 00:00:00" data-rule="开始时间:required" size="6" />
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="endtime" class="control-label col-xs-12 col-sm-2">结束时间:</label>
                                        <div class="col-xs-12 col-sm-4">
                                            <input type="text" class="form-control datetimepicker" id="endtime" name="row[endtime]" value="2019-01-01 00:00:00" data-rule="结束时间:required;match(gte, row[begintime], datetime)" size="6" />
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="weigh" class="control-label col-xs-12 col-sm-2">权重:</label>
                                        <div class="col-xs-12 col-sm-4">
                                            <input type="text" class="form-control" id="weigh" name="row[weigh]" value="1" data-rule="required" size="6" />
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-xs-12 col-sm-2">状态:</label>
                                        <div class="col-xs-12 col-sm-8">
                                            <label for="row[status]-normal"><input id="row[status]-normal" checked="checked" name="row[status]" type="radio" value="normal"> 正常</label> <label for="row[status]-hidden"><input id="row[status]-hidden" name="row[status]" type="radio" value="hidden"> 隐藏</label>        </div>
                                    </div>
                                    <div class="form-group hide layer-footer">
                                        <label class="control-label col-xs-12 col-sm-2"></label>
                                        <div class="col-xs-12 col-sm-8">
                                            <button type="submit" class="btn btn-success btn-embossed disabled">确定</button>
                                            <button type="reset" class="btn btn-default btn-embossed">重置</button>
                                        </div>
                                    </div>

                                </form>

                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <script src="assets/js/require.min.js" data-main="assets/js/require-backend.min.js"></script>
    </body>
</html>